<script>
  function delay(ms) {
    return new Promise((resolve, reject) => {
      setTimeout(resolve, ms)
    })
  }
  async function fn() {
    console.log(1)
    const i = await delay(2000).then(() => {throw 100})
    console.log(i)
    console.log(2)
  }
  fn().catch(e => console.log(e))

  async function fn2() {
    const i = await 1
    console.log(i)
  }
  fn2() // 1
</script>
